package com.lyncs.ods.modules.company.service;

import com.lyncs.ods.modules.company.model.CompanyContactInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lyncs.ods.modules.txn.model.TxnCommonInfo;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 企业通讯录 服务类
 * </p>
 *
 * @author alex
 * @since 2022-03-29
 */
public interface CompanyContactInfoService extends IService<CompanyContactInfo> {

    List<CompanyContactInfo> getConcatInfoByCompanyIds(List<Long> companyIds, Integer type);

    Map<Long, String> getConcatNameMap(List<Long> companyIds, Integer type);

    List<CompanyContactInfo> getConcatInfoByCompanyIds(Long companyId, List<Long> relationIds, Integer type);

    Map<Long, String> getConcatNameMap(Long companyId, List<Long> relationIds, Integer type);

    CompanyContactInfo getConcatInfo(Long companyId, Long relationId);

    <T extends TxnCommonInfo> Map<String, String> getConcatNameMap(@NotNull List<T> commonInfos);

    <T extends TxnCommonInfo> Map<String, CompanyContactInfo> getTxnConcatNameMap(@NotNull List<T> commonInfos);

    <T extends TxnCommonInfo> Map<Long, Map<Long, CompanyContactInfo>> getTxnConcatMap(@NotNull List<T> commonInfos);

    void removeBatch(@NotNull List<CompanyContactInfo> contactInfos);
}
